package com.youku.utils
{
   public class MathUtil extends Object
   {
      
      public function MathUtil() {
         super();
      }
      
      public static function average(param1:Array) : Number {
         if(param1 == null || param1.length == 0)
         {
            return 0;
         }
         var _loc2_:Number = 0;
         var _loc3_:Number = 0;
         var _loc4_:* = 0;
         while(_loc4_ < param1.length)
         {
            _loc2_ = _loc2_ + param1[_loc4_];
            _loc4_++;
         }
         _loc3_ = _loc2_ / param1.length;
         return _loc3_;
      }
   }
}
